﻿{template 'header', $module}
<form method="post" action="renew.php" onsubmit="return check();">
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Service fees</td>
<td class="tr"><strong class="f_red">{$MG[fee]}</strong>{$DT[money_unit]}/Years</td>
</tr>
<tr>
<td class="tl">Expiry Date</td>
<td class="tr">{$todate} ({$havedays}Days Remaining)</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> Renewals life</td>
<td class="tr">
<select name="year" id="year" onchange="Dd('payment').innerHTML = this.value*{$MG[fee]}+'{$DT[money_unit]}';">
<option value="1">1 years</option>
<option value="2">2 years</option>
<option value="3">3 years</option>
</select>
</td>
</tr>
<tr>
<td class="tl">Account Balance</td>
<td class="tr f_b f_blue">{$_money}{$DT[money_unit]}</td>
</tr>
<tr>
<td class="tl">Total Amount Payable</td>
<td class="tr f_b f_red" id="payment">{$MG[fee]}{$DT[money_unit]}</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> Payment password</td>
<td class="tr">{template 'password', 'chip'}</td>
</tr>
<tr>
<td class="tl"> </td>
<td class="tr" height="50"><input type="submit" name="submit" value=" Determined " class="btn"/></td>
</tr>
</table>
</form>
<script type="text/javascript">
function check() {
	if(Dd('year').value*{$MG[fee]} > {$_money}) {
		if(confirm('Account balance is insufficient, whether now recharge?')) window.location = 'charge.php?action=pay';
		return false;
	}
	if(Dd('password').value.length < 6) {
		alert('Please fill out the payment password');
		Dd('password').focus();
		return false;
	}
	return confirm('Sure you want to renew'+Dd('year').value+'Years when？');
}
</script>
{template 'footer', $module}